#ifndef _APRIL_MESH_H_
#define _APRIL_MESH_H_

#include "AskalExport.h"
#include "hltypes/hstring.h"
#include "hltypes/harray.h"
#include "hltypes/hmap.h"
#include "gtypes/Quaternion.h"
#include "gtypes/Vector3.h"
#include "gtypes/Vector2.h"


namespace askal
{
	struct Polygon
	{
		int mVertexIndices[3];
		gvec3 mNormal;
	};
	
	struct WeightBonePair
	{
		float mWeight;
		int mBoneIndex;
	};
	
	struct Vertex
	{
		gvec3 mPosition;
		gvec3 mNormal; 
		gvec2 mTexCoords;
		
		harray<WeightBonePair> mBoneIndices;
	};	

	class AskalExport AprilMesh
	{
	
	public:
		hstr mName;
		hmap<int, hstr> mVertexGroups;
		
		harray<Polygon> mPolygons;
		harray<Vertex> mVertices;

		harray<gvec3> mNormalArray; // 2do
		harray<gvec2> mUVArray; // 2do
		
	public:
		AprilMesh();
		~AprilMesh();
		
		void recalculateNormalData();

	};

}

#endif // _APRIL_MESH_H_
